<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDownloadLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('download_log', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('link_url',255)->nullable()->comment('下载地址');
            $table->string('ip',255)->nullable()->comment('ip地址');
            $table->integer('version_id')->nullable()->comment('版本ID')->default(0);
            $table->integer('recommend_user_id')->nullable()->comment('推荐下载用户ID')->default(0);
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('download_log', function (Blueprint $table) {
            //
        });
    }
}
